﻿@using PagedList.Mvc
@model  PagedList.IPagedList<DemoUserInfo.Models.Article>
@{
    ViewBag.Title = "Home Page";
}
<div class="row">
    <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
        <ol class="carousel-indicators">
            <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
            <li data-target="#carousel-example-generic" data-slide-to="1"></li>
            <li data-target="#carousel-example-generic" data-slide-to="2"></li>
        </ol>

        <div class="carousel-inner" role="listbox">
            <div class="item active">
                <a href="https://www.g-cores.com/volumes/94022">
                    <img alt="" class="hidden-xs" data-no-retina="" src="https://alioss.g-cores.com/uploads/focus_image/a31bd1d5-fbbb-4ec6-9889-fafd3f4c957b.jpg">
                </a>
                <div class="carousel-caption">
                </div>
            </div>
            <div class="item">
                <a href="https://www.g-cores.com/volumes/93763">
                    <img alt="" src="https://alioss.g-cores.com/uploads/focus_image/a884030a-88cf-4a76-a127-b92402c7cbce.jpg" />
                </a>
                <div class="carousel-caption">
                </div>
            </div>
            <div class="item">
                <a href="https://www.g-cores.com/volumes/93924">
                    <img alt="" src="https://alioss.g-cores.com/uploads/focus_image/09e2f107-a7ae-488c-bc3f-dc6da31607d5.jpg" />
                </a>
                <div class="carousel-caption">
                </div>
            </div>
        </div>

        <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
            <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
            <span class="sr-only">Previous</span>
        </a>
        <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
            <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
            <span class="sr-only">Next</span>
        </a>
    </div>
    <hr />

    @foreach (var item in Model)
    {
        <div class="col-md-4 col-xs-6">
            <div class="col-md-9 col-md-offset-1">
                <div class="showcase">
                    <div class="showcase_time">
                        @item.Date.ToString("yy-MM-dd")
                        <span>@item.Tag</span>
                    </div>
                    <div class="showcase_img">
                        <a href=@Url.Action("Details", "Articles", new {id = item.Id}) class="thumbnail">
                            <small id="intro">
                                @item.Introduction
                            </small>
                            <img src="@Url.Content(item.TitleImgSrc)">
                        </a>
                    </div>
                    <div class="caption showcase_text">
                        <blockquote><h4>@item.Title</h4></blockquote>
                    </div>
                </div>
            </div>
        </div>
    }
</div>
<small>Page @(Model.PageCount < Model.PageNumber ? 0 : Model.PageNumber) of @Model.PageCount</small>
@Html.PagedListPager(Model, page => Url.Action("Index", new { page }))
